#! /usr/bin/python3 python3
# -*- coding: utf-8 -*-

# *************************************************************
#  Projectname @  pysm
#     Filename @  hprose_run.py
#       Author @  Steve.ma
#  Create date @  2018/9/6
#  Description @  
# *************************************************************

import hprose
from Conf import Conf,getConf

from App.Api.Controllers.login import Controller as Login
from App.Api.Controllers.index import Controller as Index

hprose_conf = getConf('hprose')

server = hprose.HttpServer(host = hprose_conf['host'], port = hprose_conf['port'])
server.debug = True
# server.addFunction(Index.index, 'indexIndex')
# server.addFunction(Login.index, 'loginIndex')
# server.addMethods(['id', 'index'], Login, ['loginId','loginIndex'])
server.addFunctions([Login.id, Login.index], ['loginId','loginIndex'])
server.start()
